<?php

//全局继承类
namespace app\index\controller;
use think\Controller;
class Base extends Controller
{
	function bloginfo(){
		$info = db('system')->find(); 
		$user = db('admin')->field('nickname,email,autograph')->find(); 
		$twitter= db('twitter')->order('time','desc')->find(); 
		$nav = db('navi')->order('num', 'dec')->select(); 
		$link = db('links')->where('hidder', 0)->order('num','dec')->select();
		$topartice = db('blog')->where('top',1)->order('time','desc')->limit(5)->select();
		$category = db('category')->order('id','desc')->select();
		$pages = db('blog')->where('type','page')->where('show',1)->order('time','dec')->select();
		$this->assign('info',$info);
		$this->assign('user',$user);
		$this->assign('twitter',$twitter);
		$this->assign('nav',$nav);
		$this->assign('link',$link);
		$this->assign('topartice',$topartice);
		$this->assign('category',$category);
		$this->assign('navi',$pages);
	}
}
